import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:yt_devops/pages/site/widgets/home_statistics.dart';
import 'package:yt_devops/resources/str_res_keys.dart';

class HomeSiteStatisticsController extends GetxController with GetTickerProviderStateMixin {
    TabController? tabController;
    int selectedIndex = 0;
    List<Widget> homeTabviewChildren = [];
    bool firstIsStatic = false;
    String firstTabTitle = '';
    String secondTabTitle = '';
    @override
    void onInit() {
        super.onInit();
        tabController = TabController(length: homeTabviewChildren.length, vsync: this);
    }
    initData(){
        tabController = TabController(length: homeTabviewChildren.length, vsync: this);
        if(homeTabviewChildren.isNotEmpty ){
            if(homeTabviewChildren.length == 1){
                if(firstIsStatic){
                    firstTabTitle = ResKey.statistics;
                }else{
                    firstTabTitle = ResKey.site;
                }
            }else if(homeTabviewChildren.length == 2){
                firstTabTitle = ResKey.site;
                secondTabTitle = ResKey.statistics;
            }

        }
    }

    @override
    void onReady() {}

    @override
    void onClose() {}
    addSite(){

    }
}
